<!DOCTYPE HTML>
<html  lang="zh" xmlns:th="http://www.thymeleaf.org">
<meta charset="utf-8">
<head th:include="include :: header"></head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-zhWaiter-edit" th:object="${zhWaiter}">
            <input id="id" name="id" th:field="*{id}"  type="hidden">

			<div class="form-group">
				<label class="col-sm-3 control-label">联系方式类型：</label>
				<div class="col-sm-8">
					<select id="contactType" name="contactType" class="form-control m-b" th:with="type=${@dict.getType('sys_contant_type')}">
						<option  th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:selected="${dict.dictValue+''==zhWaiter.contactType+''}"></option>
					</select>
				</div>
			</div>

			<div class="form-group">
				<label class="col-sm-3 control-label">联系方式：</label>
				<div class="col-sm-8">
					<input id="contact" name="contact" th:field="*{contact}" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">站点：</label>
				<div class="col-sm-8">
					<select id="deptId" name="deptId" class="form-control m-b" >
						<option th:each="zhDept:${zhDepts}" th:value="${zhDept.deptId}" th:text="${zhDept.name}" th:field="*{deptId}"></option>
					</select>
				</div>
			</div>


			<div class="form-group">
				<label class="col-sm-3 control-label">备注：</label>
				<div class="col-sm-8">
					<textarea id="remark" name="remark" class="form-control" th:field="*{remark}"></textarea>
				</div>
			</div>

		</form>
    </div>
    <div th:include="include::footer"></div>
    <!--todo 有下拉框需要引入select.js-->
	<script th:src="@{/ajax/libs/select/select2.js}"></script>

	<script type="text/javascript">
		var prefix = ctx + "system/zhWaiter";
		$("#form-zhWaiter-edit").validate({
			rules:{
				xxxx:{
					required:true,
				},
			}
		});

		function submitHandler() {
	        if ($.validate.form()) {
	            $.operate.save(prefix + "/edit", $('#form-zhWaiter-edit').serialize());
	        }
	    }

	</script>
</body>
</html>
